package com.hopes.bizz.hazard.common.api.feign;

import com.hopes.bizz.common.core.constant.ServiceNameConstants;
import com.hopes.bizz.hazard.om.entity.HazRtDataEntity;
import com.hopes.boss.admin.api.resolver.IDict;
import com.hopes.boss.common.core.constant.SecurityConstants;
import com.hopes.boss.common.core.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @author daijie
 * @version 1.0
 * @date 2023/10/27 14:08
 * @Description:
 */
@FeignClient(contextId = "remoteHazardDictService", value = ServiceNameConstants.PARK_HAZARD_SERVER)
public interface RemoteHazardDictService extends IDict {

    /**
     * 查询传感器下的监控数据
     * @param from
     * @return
     */
    @GetMapping({"/rtData/getByMonitorFactorId/{monitorFactorId}"})
    R<HazRtDataEntity> getByMonitorFactorId(@PathVariable("monitorFactorId") Long monitorFactorId, @RequestHeader(SecurityConstants.FROM) String from);
}
